﻿<%@ page import="com.qipay.baas.model.User" %>
<%@ page import="com.qipay.baas.model.Peizhi" %>
<header class="main-header">
    <script src="<%= request.getAttribute("StaticHost") %>/js/jquery.js"></script>
    <script type="text/javascript">
        document.getElementsByTagName("html")[0].style.fontSize=screen.availWidth/200+"px";
    </script>
    <%
        Peizhi peizhi = (Peizhi)request.getAttribute("peizhi");%>

    <!-- Logo -->
    <a id="logologo" href="${pageContext.request.contextPath}/index" class="logo" >
        <!-- mini logo for sidebar mini 50x50 pixels -->
        <span class="logo-mini"><b>D</b>ONG</span>
        <!-- logo for regular state and mobile devices -->
        <span class="logo-lg"><%=peizhi.getWebName()%></span>
    </a>
    <!-- Header Navbar: style can be found in header.less #00b74a-->
    <nav class="navbar navbar-static-top">
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button" >
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
        </a>
        <div id="tabTitle" class="navbar-custom-menu" style="float: left;padding-top: 13px;font-weight: bold;font-size: 17px;"></div>
        <script>
                var title = window.document.title;
                $('#tabTitle').html(title);
        </script>
        <div class="navbar-custom-menu" >
            <%

                User user = (User) session.getAttribute("user");
                String userName = "未登录";
                if (null!=user){
                    userName = user.getName();
                }
            %>
            <ul class="nav navbar-nav" style="margin-right: 10px;">
                <li class="dropdown notifications-menu" >
                    <a href="${pageContext.request.contextPath}/index">
                        <i class="fa fa-home"></i>
                        <span class="label label-warning" ></span>
                    </a>
                </li>

                <li class="dropdown user user-menu" style="width: 15rem; white-space: nowrap;overflow: hidden;">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" >
                        <img src="<%= request.getAttribute("StaticHost") %>/img/<%= peizhi.getWebLogo()%>" class="user-image" alt="User Image"><span class="hidden-xs"><%= userName%></span>
                    </a>
                <li/>
                <li class="dropdown notifications-menu" >
                    <a href="${pageContext.request.contextPath}/logout">
                        <i class="fa fa-power-off"></i>
                        <span class="label label-warning" ></span>
                    </a>
                </li>
            </ul>
        </div>
    </nav>
</header>